// 阶乘:   eg: 4的阶乘: 1x2x3x4   

function factorial(n) {
    if (n == 1) {
        return 1
    }
    return n * factorial(n - 1)
}
console.log(factorial(4));  //24
